package com.career.syn.constant;

/**
 * 
 * @ClassName: Constant
 * @Description: 常量
 * @author georgeli
 * @date 2018年7月2日 下午6:03:16
 */
public class Constant {
	
	// 日期格式
	public static final String[] DATE_PATTERNS = new String[] { "yyyy", "yyyy-MM", "yyyyMM", "yyyy/MM", "yyyy-MM-dd", "yyyyMMdd", "yyyy/MM/dd", "yyyy-MM-dd HH:mm", "yyyy-MM-dd HH:mm:ss", "yyyyMMddHHmmss" };

	// encoding
	public static final String ENCODING = "UTF-8";

	// url path
	public final static String URL_PATH = "/";

	// split字符
	public static final String SPLIT = "#";

	// 项目名称
	public final static String PROJECT_NAME = "crm";

	// 第三方接口正则
	public final static String API_URI = "/" + PROJECT_NAME + "/v\\d*\\.?\\d*(/[a-zA-Z0-9_\\-\\.]+)+/api(/[a-zA-Z0-9_\\-\\.]+)+";

	// web端接口正则
	public final static String WEB_URI = "/" + PROJECT_NAME + "/v\\d*\\.?\\d*(/[a-zA-Z0-9_\\-\\.]+)+/web(/[a-zA-Z0-9_\\-\\.]+)+";

	// app端接口正则
	public final static String APP_URI = "/" + PROJECT_NAME + "/v\\d*\\.?\\d*(/[a-zA-Z0-9_\\-\\.]+)+/app(/[a-zA-Z0-9_\\-\\.]+)+";
	
	// 是否第三方接口
	public final static String IS_API_URI = "IS_API_URI";

	// 是否web端接口
	public final static String IS_WEB_URI = "IS_WEB_URI";

	// 是否app端接口
	public final static String IS_APP_URI = "IS_APP_URI";

	// 第三方接口token redis key
	public final static String REDIS_API_ACCESSTOKEN = "api_accessToken_";

	// web端接口token redis key
	public final static String REDIS_WEB_ACCESSTOKEN = "web_accessToken_";

	// app端接口token redis key
	public final static String REDIS_APP_ACCESSTOKEN = "app_accessToken_";
	
	public final static String REDIS_PRODUCT = "product_";

	public final static String REDIS_COOKIES = "cookies_";

	public final static String REDIS_BLACKLIST = "blackList";

	public final static String REDIS_MONITORJOB_STATUS = "monitorJob_status";
	
	public final static String REDIS_VERSIONS = "versions";
	
	public final static String REDIS_NUM_PREFIX = "numPrefix";

	public final static String REDIS_CANDIDATE_NO = "candidateNo";
	
	public final static String REDIS_ACCOUNT_NO = "accountNo";

	// 未自动登录token超时时间
	public final static int REDIS_ACCESSTOKEN_NOT_AUTO = 2;
	
	// 自动登录token超时时间
	public final static int REDIS_ACCESSTOKEN_AUTO = 7;

	// 参数key
	public final static String PARAM_ACCESSTOKEN = "accessToken";
	
	public final static String PARAM_USERNAME = "username";

	public final static String PARAM_APIKEY = "apiKey";

	public final static String PARAM_TIMESTAMP = "timestamp";

	public final static String PARAM_NONCE = "nonce";
	
	public final static String PARAM_SIGNATURE_METHOD = "signatureMethod";

	public final static String PARAM_AUTHORIZATION = "Authorization";

	// cookiesId字段
	public final static String COOKIESID_KEY = PROJECT_NAME + "CookiesId";

	// requestId字段
	public final static String REQUESTID_KEY = "requestId";

	// isSuccess
	public final static String ISSUCCESS = "isSuccess";

	// req字段
	public final static String REQ_KEY = "req";

	// account字段
	public final static String ACCOUNT_KEY = "account";

	// product字段
	public final static String PRODUCT_KEY = "product";

	// user agent字段
	public final static String USER_AGENT = "user-agent";

	// param连接符
	public final static String PARAM_CONNECTOR = "&";
	
	// jsonText字段名称
	public final static String FILED_JSON_TEXT = "jsonText";
	
	// 权限
	public final static String AUTHORIZATION_MAPPING = "authorizationMapping";
	
	// 公司
	public final static String COMPANY_MAP = "companyMap";
	
	// 账号来源-talink
	public final static String ACCOUNT_FROM_TALINK = "talink";

}
